package com.android.sdkbuilder;

import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.util.Log;
import android.view.View;
import android.widget.Button;

import com.android.sdklibrary.admin.SdkBuilder;
import com.android.sdklibrary.admin.SdkDirector;
import com.android.sdklibrary.admin.SdkImplBuilder;
import com.zlzf.testlibrary.bean.AsyncHttpCallback;
import com.zlzf.testlibrary.bean.SDKInto;


public class MainActivity extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);

        Button buttonSDk = (Button) findViewById(R.id.ssjssdksdk);

        buttonSDk.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                SDKInto instance = SDKInto.getInstance();
                instance.setAppSeqId("asdfghjkzxcvbnmp0987654321").setCustomId("这里是test,")
                        .GotoActivity(MainActivity.this);
                instance  .callBack(new AsyncHttpCallback() {
                    @Override
                    public void OnSucess(String s) {
                        Log.e("TAG" ,"s=============》"+s);
                    }
                });
            }
        });
    }

    public void sisijj(View view) {
        SdkBuilder sdkBuilder = new SdkImplBuilder();
        SdkDirector sdkDirector = SdkDirector.getInstance(sdkBuilder);
        sdkDirector.setUserAppName("SDK").setUserKey("1232345").setUserChannel("123").GotoActivity(this);
    }
}
